timezone_name_get
DateTimeZone::getName的別名- 返回時區名稱
timezone_name_get()
返回時區的名稱。
返回時區的名稱:
<?php $tz = timezone_open ( "America/New_York" ) ; echo timezone_name_get ( $tz ) ; ?>
親自試一試
timezone_name_get ( object ) ;
參數 | 描述 |
---|---|
object | 必需。規定DateTimeZone 對象。 |